package com.wisezone.demo0215;

import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;

public class Test {
    public static void main(String[] args) {

        try {
            InetAddress address=InetAddress.getByName("www.baidu.com");

            System.out.println(address.getHostAddress());
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }
}
